﻿<%@ Page EnableEventValidation="true" Title="个人中心-购彩记录" Language="C#" MasterPageFile="~/APP_Master/MasterPage_Personal.master"
    AutoEventWireup="true" CodeFile="per_together.aspx.cs" Inherits="per_together" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <script src="App_Themes/js/jquery-1.4.2.min.js"></script>
    <script src="App_Themes/js/jquery.jBox.src.js"></script>
   <%-- <script src="js/jquery-1.7.min.js" type="text/javascript"></script>
    <script src="App_Themes/js/jquery.jBox-2.3.min.js" type="text/javascript"></script>--%>
    <script src="App_Themes/js/jquery.jBox-zh-CN.js" type="text/javascript"></script>
    <link href="App_Themes/css/Red/jbox.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
        function togetherBuyInfo(id) {
            jBox("iframe:/togetherBuyInfo.aspx?id=" + id, {
                title: "查看号码详细",
                width: 600,
                height: 400,
                top: 100,
                buttons: {}
            })
        }
        function getUserInfo(id, type, qs) {
           jBox("iframe:/getUserInfo.aspx?id=" + id + "&type=" + type + "&qs=" + qs, {
                title: "查看参与人员",
                width: 600,
                height: 400,
                top: 100,
                buttons: {}
            })
        }
        //清除cookie  
        function clearCookie(name) {
            setCookie(name, "", -1);
        }
        //设置cookie
        function setCookie(cname, cvalue, exdays) {
            var d = new Date();
            d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));
            var expires = "expires=" + d.toUTCString();
            document.cookie = cname + "=" + cvalue + "; " + expires;
        }
        $(document).ready(function () {
            //-----------------Start-----------------------
            //5为3D，1为双色球，2为大乐透
            var strRequest = getQueryString("StrClear");
            if (strRequest == "5") {
                clearCookie("cookiestr_3d_betting");
                clearCookie("cookiestr_3d_betting_arrcount");
                clearCookie("ArrayList_3d");
                clearCookie("ArrayList_3dDelete");
            }
            else if (strRequest == "1") {
                clearCookie("cookiestr_double_betting");
                clearCookie("cookiestr_double_betting_arrcount");
                clearCookie("ArrayList");
            }
            else {
                clearCookie("cookiestr_dlt_betting");
                clearCookie("cookiestr_dlt_betting_arrcount");
                clearCookie("ArrayList_dlt");
            }
            //-----------------End-----------------------
        });
        //获取地址栏上的参数
        function getQueryString(key) {
            var searchString = document.location.search.toString();
            var returnValue = '';
            if (searchString.substr(0, 1) == '?' && searchString.length > 1) {
                var queryString = searchString.substring(1, searchString.length)
                var queryList = queryString.split('&');
                for (var i = 0; i < queryList.length; i++) {
                    var oneQuery = queryList[i].split('=');
                    if (oneQuery[0] == key && oneQuery.length == 2) {
                        returnValue = oneQuery[1];
                    }
                }
            }
            return returnValue;
        }
    </script>
    <style type="text/css">
        .per_record_ul_t {
            width: 100%;
            height: 35px;
            background: #EAEAEA;
        }

            .per_record_ul_t li {
                float: left;
                width: 10%;
                text-align: center;
                line-height: 35px;
                font-size: 13px;
            }

        .per_record_ul {
            width: 100%;
            padding: 10px 0;
            border-bottom: 1px solid #EAEAEA;
            height: 40px;
            color: #858585;
            line-height: 20px;
        }

            .per_record_ul li {
                float: left;
                width: 10%;
                /*text-indent: 30px;*/
                text-align: center;
            }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <!--Right-->
    <div class="per_bg_white_right">
        <div class="per_record_t_box">
            <dl class="select03">
                <asp:DropDownList ID="timesl" runat="server" AutoPostBack="true"
                    OnSelectedIndexChanged="timesl_SelectedIndexChanged">
                    <asp:ListItem Value="5">全部</asp:ListItem>
                    <asp:ListItem Value="0">今天</asp:ListItem>
                    <asp:ListItem Value="1">近一周</asp:ListItem>
                    <asp:ListItem Value="2">近一个月</asp:ListItem>
                    <asp:ListItem Value="3">近三个月</asp:ListItem>
                    <asp:ListItem Value="4">近六个月</asp:ListItem>
                </asp:DropDownList>
            </dl>
            <dl class="select03">
                <asp:DropDownList ID="typeslddl" runat="server" AutoPostBack="true"
                    OnSelectedIndexChanged="typeslddl_SelectedIndexChanged">
                    <asp:ListItem Value="0">全部彩种</asp:ListItem>
                    <asp:ListItem Value="1">双色球</asp:ListItem>
                    <asp:ListItem Value="2">大乐透</asp:ListItem>
                    <asp:ListItem Value="3">排列三</asp:ListItem>
                    <asp:ListItem Value="4">排列五</asp:ListItem>
                    <asp:ListItem Value="5">福彩3D</asp:ListItem>
                    <asp:ListItem Value="6">七星彩</asp:ListItem>
                    <asp:ListItem Value="7">七乐彩</asp:ListItem>
                </asp:DropDownList>

            </dl>
            <div class="per_record_t">
                <asp:RadioButton ID="CheckBox1" runat="server" AutoPostBack="true" GroupName="aa"
                    OnCheckedChanged="CheckBox1_CheckedChanged" />
                &nbsp;&nbsp;已中奖
            </div>
            <%--<div class="per_record_t">
                <asp:RadioButton ID="RadioButton1" runat="server" AutoPostBack="true" GroupName="aa"
                    OnCheckedChanged="CheckBox1_CheckedChanged"  />
                &nbsp;&nbsp;未中奖
            </div>--%>
            <div class="per_record_t">
                <asp:RadioButton ID="CheckBox3" runat="server" AutoPostBack="true" GroupName="aa"
                    OnCheckedChanged="CheckBox3_CheckedChanged" />
                &nbsp;&nbsp;未中奖
            </div>
            <div class="per_record_t">
                <asp:RadioButton ID="CheckBox2" runat="server" AutoPostBack="true" GroupName="aa"
                    OnCheckedChanged="CheckBox2_CheckedChanged" Checked="true" />
                &nbsp;&nbsp;未开奖
            </div>
            <div class="per_record_t">
                <asp:RadioButton ID="myhm" runat="server" GroupName="lotteryList" AutoPostBack="true" Checked="true"
                    OnCheckedChanged="myhm_CheckedChanged" />我发布的
            </div>
            <div class="per_record_t">
                <asp:RadioButton ID="cyhm" runat="server" GroupName="lotteryList" AutoPostBack="true"
                    OnCheckedChanged="cyhm_CheckedChanged" />我参与的  
            </div>
        </div>
        <ul class="per_record_ul_t">
            <li>时间</li>
            <li>彩种|期次</li>
            <li>发起人</li>
            <li>方案描述</li>
            <li>我购买了</li>
            <li>进度</li>
            <li>出票状态</li>
            <li>中奖奖金</li>
            <li>查看号码</li>
            <li>参与人员</li>

        </ul>

        <%if (buyInfo != null && buyInfo.Count > 0)
            { %>

        <%
            for (int i = 0; i < buyInfo.Count; i++)
            {%>
        <ul class="per_record_ul">

            <li>
                <p><%=Convert.ToDateTime(buyInfo[i].AddTime).ToString("yyyy-MM-dd")%></p>
                <p><%=Convert.ToDateTime(buyInfo[i].AddTime).ToString("H:M:ss") %></p>
            </li>
            <li><b><%=Convert.ToInt16(buyInfo[i].LotteryType)== 1 ? "双色球" :
                                      (Convert.ToInt16(buyInfo[i].LotteryType) == 2 ? "大乐透" :
                                                     (Convert.ToInt16(buyInfo[i].LotteryType) == 3 ? "排列三" :
                                                                    (Convert.ToInt16(buyInfo[i].LotteryType) == 4 ? "排列五" :
                                                                                   (Convert.ToInt16(buyInfo[i].LotteryType) == 5 ? "福彩3D" :
                                                                                                  (Convert.ToInt16(buyInfo[i].LotteryType) == 6 ? "七星彩" :
                                                                                                                 (Convert.ToInt16(buyInfo[i].LotteryType) == 7 ? "七乐彩" : ""))))))%></b>
                <%=buyInfo[i].LotteryOpenTime%>期
            </li>
            <li>
                <p><%=select(buyInfo[i].UserID)%></p>
            </li>
            <li>合买 <%=buyInfo[i].LotteryMoney%>元<%=buyInfo[i].LotteryCount%>注(<%=buyInfo[i].LotteryMultiple%>倍)
            </li>
            <li>
                <h2><em><%=buyInfo[i].MySub%></em>元</h2>
            </li>
            <li>
                <h2><%=buyInfo[i].LotteryJD%>%</h2>
            </li>
            <li>
                <b><%=buyInfo[i].LotteryJD == 100 ? "出票成功" : "取消出票"%></b>
                <%-- <b><%=Convert.ToBoolean(buyInfo[i].State) == false ? "取消出票" : "出票成功"%></b>--%>
                <%-- <p><%=Convert.ToBoolean(buyInfo[i].State) == false ? "未满员" : "已满员"%></p>--%>
            </li>
            <li><b>
                <%=Convert.ToBoolean(buyInfo[i].Flag) == false ? "等待开奖" : "已派奖"%>
            </b>
                <p>
                    <%if (Convert.ToBoolean(buyInfo[i].IsWin) == false)
                        {%>  ---<%}
                                    else
                                    {%><em style="color: Red"><%=buyInfo[i].WinMoney%></em>元<%}%>
                </p>
            </li>
            <li><a href="javascript:void(0);" onclick="return togetherBuyInfo(<%=Convert.ToInt16(buyInfo[i].id)%>)">查看号码</a></li>
            <li><a href="javascript:void(0);" onclick="return getUserInfo(<%=Convert.ToInt16(buyInfo[i].id)%>,<%=buyInfo[i].LotteryType%>,<%=buyInfo[i].LotteryOpenTime%>)">参与人员</a></li>

        </ul>
        <%}
            }
            else
            { %>
        <ul class="per_integral_con_ul">

            <div style="text-align: center">暂无记录</div>
        </ul>
        <%}%>
        <!--Pages-->
        <div class="sabrosus">
            <webdiyer:AspNetPager SubmitButtonClass="buttons" ID="AspNetPager1"
                runat="server" AlwaysShow="True" FirstPageText="首页"
                NextPageText="下一页" PrevPageText="前一页" LastPageText="尾页" PageSize="10"
                OnPageChanged="AspNetPager1_PageChanged">
            </webdiyer:AspNetPager>
        </div>
        <!--Pages-->
        <div class="per_r_infor per_noborder">
            <h3>购彩记录-注意事项：</h3>
            <p>历史记录指当年近一个月之前的所有购彩记录（不包含近一个月的投注记录）；</p>
            <p>如订单已显示奖金，但彩票账户实际未派发奖金，请耐心等待，系统正在与彩票中心核算奖金，预计30分钟左右派发到您的彩票账户；</p>
        </div>
    </div>
    <!--Right-->
    </div>
    <!--Content-->
</asp:Content>
